/*** Eclipse Class Decompiler plugin, copyright (c) 2012 Chao Chen (cnfree2000@hotmail.com) ***/
package com.qihoo.gamecenter.sdk.pay.g;

import android.text.TextUtils;
import com.qihoo.gamecenter.sdk.common.i.j;
import com.qihoo.gamecenter.sdk.pay.k.c;
import java.util.ArrayList;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;

public class b {
    private static boolean a = false;
    private static boolean b = j.a;
    private static int c = 20000;
    private static boolean d = true;
    private static boolean e = false;
    private static String f = "www.mo9.com.cn";

    public static boolean a() {
        return e;
    }

    public static void a(boolean paramBoolean) {
        e = paramBoolean;
    }

    public static void a(String paramString) {
        f = paramString;
    }

    public static String b() {
        return ((TextUtils.isEmpty(f)) ? "www.mo9.com.cn" : f);
    }

    public static boolean c() {
        return a;
    }

    public static boolean d() {
        return d;
    }

    public static void b(String paramString) {
        try {
            if (TextUtils.isEmpty(paramString))
                return;
            JSONObject localJSONObject1 = new JSONObject(paramString);
            int i = localJSONObject1.optInt("error_code", -1);
            if (i == 0) {
                a = localJSONObject1.optInt("can_use_sms", 0) == 1;
                c.a("PayConfig", new Object[] { "sSmsPayEnable=", Boolean.valueOf(a) });
                c = localJSONObject1.optInt("credit_verify_amount", 20000);
                c.a("PayConfig", new Object[] { "sCreditVerifyAmount=", Integer.valueOf(c) });
                d = localJSONObject1.optInt("credit_reload_multi", 1) == 1;
                c.a("PayConfig", new Object[] { "sShouldRefreshMultiBind=", Boolean.valueOf(d) });
                boolean bool = false;
                ArrayList localArrayList = null;
                JSONObject localJSONObject2 = localJSONObject1.optJSONObject("bind_cards");
                if (localJSONObject2 != null) {
                    bool = localJSONObject2.optInt("succ", 0) == 1;
                    JSONArray localJSONArray = localJSONObject2.optJSONArray("cards");
                    if (localJSONArray != null) {
                        int j = localJSONArray.length();
                        localArrayList = new ArrayList(j);
                        for (int k = 0; k < j; ++k) {
                            com.qihoo.gamecenter.sdk.pay.e.a locala = com.qihoo.gamecenter.sdk.pay.e.a.a(localJSONArray
                                    .optJSONObject(k));
                            if (locala == null)
                                continue;
                            localArrayList.add(locala);
                            c.a("PayConfig", new Object[] { locala.toString() });
                        }
                    }
                }
                c.a("PayConfig", new Object[] { "sBindQuerySucc=", Boolean.valueOf(bool) });
                a.b(bool);
                a.a(localArrayList);
            }
        } catch (JSONException localJSONException) {
            c.c("PayConfig", new Object[] { localJSONException.toString() });
        }
    }
}